package pile.pay.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
 * <p>
 * 用户余额表
 * </p>
 *
 * @author 郭天义
 * @since 2024-06-29
 */
@Getter
@Setter
@TableName("sys_balance_change")
@ApiModel(value = "BalanceChange对象", description = "用户余额表")
public class BalanceChange implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("余额id")
    @TableId(value = "balance_change_id", type = IdType.AUTO)
    private Integer balanceChangeId;

    @ApiModelProperty("用户id")
    private Integer memberId;

    @ApiModelProperty("类型  支出 /1  收入/0")
    private Integer type;

    @ApiModelProperty("备注  文字说明是哪一种场景")
    private String remarks;

    @ApiModelProperty("消费金额")
    private BigDecimal amount;

    @ApiModelProperty("变动之前余额")
    private BigDecimal balanceBefore;

    @ApiModelProperty("变动之后余额")
    private BigDecimal balanceAfter;

    @ApiModelProperty("场景  0/充值余额 1/充电扣费 2/提现扣费 3/充值会员 4/预约扣费 5/提现失败 6/商户收费 7/退款成功 8/商户提现")
    private Integer scene;

    @ApiModelProperty("是否删除 1/是， 0/否")
    @TableLogic
    private Integer isDelete;

    @ApiModelProperty("添加时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty("删除时间")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date deleteTime;

    @ApiModelProperty("乐观锁")
    @Version
    private Integer version;

    @ApiModelProperty("渠道 1/卫莱电微信小程序 2/卫莱电支付宝小程序 3/阿凡电微信小程序 4/阿凡电支付宝小程序")
    private Integer channel;


}
